<?php
namespace Json\Controller;
use Think\Controller;
class CoachController extends Controller {
  public function coachlistJson(){
       
       $use= $this->users=M('coach')->select();
   echo json_encode($use);
      } 
  
    public function coachOneJson($id){
       
       $coach = M('coach') -> where("coachid='$id'") -> find();
       echo json_encode($coach);
      } 

}